<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>百顺通云-后台用户管理</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- 公用CSS文件引入 -->
        <jsp:include page="../../admin/commonCSS.jsp"></jsp:include>
        
       	<!-- 图片裁剪插件 css -->
		<link href="/cdn/Jcrop-v0.9.12/css/jquery.Jcrop.css" type="text/css" rel="stylesheet"/>
        
        <!-- 局部css -->
        <link href="/css/admin/productManager.css" rel="stylesheet" type="text/css"/>
 
    </head>
    <body class="skin-blue">
        
		<!-- 公用头部 -->
        <jsp:include page="../../admin/commonHeader.jsp"></jsp:include>
        
        <div class="wrapper row-offcanvas row-offcanvas-left">
            
            <!-- 公用导航 -->
            <jsp:include page="../../admin/commonMenu.jsp"></jsp:include>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>产品管理列表<small>产品列表信息</small></h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
                        <li class="active">产品管理</li>
                        <li class="active">商品列表</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content" id="publishbox">
			  		<!--  -->
			  		<div id="sec2">
			  			<div>
			  				<form class="form-horizontal" role="form" id="good">
			  					<input type="hidden" name="goodsId" value="${goods.goodsId}"/>
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">商品编码：</label>
								    <div class="col-sm-3">
								      <input type="text" name="goodsNum" value="${goods.goodsNum}" class="form-control input-sm" placeholder="请输入1-1000之间的整数">
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">商品名称：</label>
								    <div class="col-sm-3">
								      <input type="text" name="goodsName" value="${goods.goodsName}" class="form-control input-sm" placeholder="商品名称">
								    </div>
								  </div>
								 <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">商品分类：</label>
								    <div class="col-sm-3">
								      <select class="form-control input-sm" name="typeId">
										  <c:forEach items="${goodsTypeList}" var="gtl">
	                                   	  	<option value="${gtl.typeId}"  data-level="${gtl.typeLevel}" <c:if test="${goods.typeId == gtl.typeId}">selected=selected</c:if>>${gtl.typeName}</option>
	                                   	  </c:forEach>
									  </select>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">商品URL：</label>
								    <div class="col-sm-3">
								      <input type="text" name="goodsUrl" value="${goods.goodsUrl}" class="form-control input-sm" placeholder="商品URL">
								    </div>
								  </div>
								  <!-- 选择分类产品 -->
								  <div class="form-group" id="chooseCategoryProducts">
								    <label for="inputPassword3" class="col-sm-2 control-label">选择分类产品：</label>
								    <div class="col-sm-3 choosecategory">
										<div class="input-group">
									      <input class="form-control" name="categoryproes" type="text" placeholder="选择分类产品" data-ids="${productNums}" value="${proNames}">
									      <div class="input-group-addon">...</div>
									    </div>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">关联商品：</label>
								    <div class="col-sm-3 choosecategory">
										<select name="goodsRalateGoods" class="form-control input-sm">
											<option value="0">请选择</option>
											<c:forEach items="${goodsList}" var="gl">
												<option value="${gl.goodsId}" <c:if test="${gl.goodsId == goods.goodsRalateGoods}">selected=selected</c:if>>${gl.goodsName}</option>
											</c:forEach>
										</select>	
								    </div>
								  </div>
								  <div class="form-group proicon">
								    <label for="inputPassword3" class="col-sm-2 control-label">商品图标：</label>
								    <div class="col-sm-8 prettyTab">
								      	<div>
											<div class="btn-group">
											  <button type="button" class="btn btn-default prettyTabNav">本地图片</button>
											  <button type="button" class="btn btn-default prettyTabNav">产品相册</button>
											</div>
											<div class="prettyTabCont">
												<div class="prettyTabItem">
													<div class="row">
													  <div class="col-md-5 iconcutbox">
													  	<p>仅支持jpg、png格式图片，且规格是270*290</p>
													  	<div class="iconbox">
 													  		<img src="${goods.goodsImgUrl}" id="showImg">
													  	</div>
													  	<div class="row img_buttonbox">
														  <div class="col-md-8">
														  	<div class="input-group fileinput">
															  <input type="text" id="picUrl" name="goodsImgUrl" value="${goods.goodsImgUrl}" class="form-control">
															  <input type="hidden" id="attachIds" name="attachIds" value="${goods.attachIds}" class="form-control">
															  <label class="input-group-addon">浏览</label>
															  <input type="file" id="advImage" name="advImage" class="form-control"/>
															</div>
														  </div>
														  <div class="col-md-4 confirmcut">
														  	<button type="button" class="btn btn-default">确认并裁剪</button>
														  </div>
														</div>
													  </div>
													  <div class="col-md-4 iconrightbox" style="position:relative;">
													  	<p>预览</p>
													  	<div class="iconpreview" id="preview-pane">
													  		<img src="/images/admin/kong.gif" id="crop_preview" />
													  	</div>
													  	<p>270*290</p>
													  </div>
													</div>
												</div>
												<div class="prettyTabItem proalbum" style="display:none;">
													<div class="row">
													  <c:forEach items="${attachs}" var="attach">
														  <div class="col-md-2 proimgbox">
														  	<img class="proimg" src="${attach.attachPath}" />
														  </div>
													  </c:forEach>
													</div>  
													<div> 
														<p>预览</p>
													  	<div class="iconpreview">
													  		<img src="/images/admin/kong.gif" id="iconpreview" />
													  	</div>
													  	<p style="padding-left: 20px; margin-top: 10px;">270*290</p>
													  	<button type="button" class="btn btn-default confirmsave">确定保存</button>
													</div>
												</div>
											</div>
										</div>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">行业：</label>
								    <div class="col-sm-3">
										<select name="industryCode" class="form-control input-sm">
											<c:forEach items="${industries}" var="industry">
												<option value="${industry.staticDataCode}" <c:if test="${goods.industryCode == industry.staticDataCode}">selected=selected</c:if>>${industry.staticDataName}</option>
											</c:forEach>
										</select>	
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">应用类别：</label>
								    <div class="col-sm-3">
										<select name="categoryCode" class="form-control input-sm">
											<c:forEach items="${goodCategories}" var="category">
												<option value="${category.staticDataCode}" <c:if test="${goods.categoryCode == category.staticDataCode}">selected=selected</c:if>>${category.staticDataName}</option>
											</c:forEach>
										</select>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">商品简介：</label>
								    <div class="col-sm-4">
										<textarea class="form-control" rows="4" id="pro_character" name="goodsCharacter">${goods.goodsCharacter}</textarea>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">简短描述：</label>
								    <div class="col-sm-8">
										<textarea id="pro_abstract" name="goodsBrief">${goods.goodsBrief}</textarea>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">软件开发商：</label>
								    <div class="col-sm-3">
										<input type="text" class="form-control input-sm" value="${goods.goodsDeveloper}" name="goodsDeveloper" placeholder="软件开发商">	
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">版本编号：</label>
								    <div class="col-sm-3">
										<input type="text" class="form-control input-sm" value="${goods.goodsVersion}" name="goodsVersion" placeholder="版本编号">	
								    </div>
								  </div>
								  <div class="form-group between-group">
								    <label class="col-sm-2 control-label">用户数范围：</label>
								    <div class="col-sm-3">
										<input type="text" name="usersMin" value="${goods.usersMin}" placeholder="低位段 正整数" class="form-control input-sm num">	
										<span>~</span>
										<input type="text" name="usersMax" value="${goods.usersMax}" placeholder="高位段 正整数" class="form-control input-sm num">	
								    </div>
								  </div>
								  <div class="form-group between-group">
								    <label class="col-sm-2 control-label">年限范围：</label>
								    <div class="col-sm-3">
										<input type="text" name="yearsMin" value="${goods.yearsMin}" placeholder="低位段 正整数" class="form-control input-sm num">	
										<span class="">~</span>
										<input type="text" name="yearsMax" value="${goods.yearsMax}" placeholder="高位段 正整数" class="form-control input-sm num">	
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">报价：</label>
								    <div class="col-sm-3">
										<input type="text" class="form-control input-sm" value="${goods.goodsPrice}" name="goodsPrice" placeholder="报价">	
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">单位：</label>
								    <div class="col-sm-3">
										<select class="form-control input-sm" name="goodsPriceUnit">
											<c:forEach items="${units}" var="unit">
												<option value="${unit.staticDataCode}" <c:if test="${goods.goodsPriceUnit == unit.staticDataCode}">selected=selected</c:if>>${unit.staticDataName}</option>
											</c:forEach>
										</select>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">计费模式：</label>
								    <div class="col-sm-3">
								    	<select name="goodsFeeId" class="form-control input-sm">
											<c:forEach items="${goodsFeeList}" var="goodsFee">
												<option value="${goodsFee.goodsFeeId}"  <c:if test="${goods.goodsFeeId == goodsFee.goodsFeeId}">selected=selected</c:if>>${goodsFee.feeName}</option>
											</c:forEach>
										</select>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">优惠折扣：</label>
								    <div class="col-sm-3">
										<input type="text" class="form-control input-sm" value="${goods.privilege}" name="privilege" placeholder="优惠折扣">	
								    </div>
								  </div>
								  <div class="form-group prointro">
								    <label for="inputPassword3" class="col-sm-2 control-label">产品说明：</label>
								    <div class="col-sm-8 prettyTab">
										<div>
											<div class="btn-group">
											  <button type="button" class="btn btn-default prettyTabNav on">功能概述</button>
											  <button type="button" class="btn btn-default prettyTabNav">功能介绍</button>
											  <button type="button" class="btn btn-default prettyTabNav">产品优点</button>
											  <button type="button" class="btn btn-default prettyTabNav">收费标准</button>
											  <button type="button" class="btn btn-default prettyTabNav">下载中心</button>
											</div>
											<div class="prettyTabCont">
												<div class="prettyTabItem">
													<textarea id="pro_goverview" name="goodsSummarize">${goods.goodsSummarize}</textarea>
												</div>
												<div class="prettyTabItem">
													<textarea id="pro_funcintro" name="goodsFunction">${goods.goodsFunction}</textarea>
												</div>
												<div class="prettyTabItem">
													<textarea id="pro_advantage" name="goodsSpecialtyBrief">${goods.goodsSpecialtyBrief}</textarea>
												</div>
												<div class="prettyTabItem">
													<textarea id="pro_charge" name="goodsFeeScale">${goods.goodsFeeScale}</textarea>
												</div>
												<div class="prettyTabItem">
													<textarea id="pro_download" name="uploadCenter">${goods.uploadCenter}</textarea>
												</div>
											</div>
										</div>
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="inputPassword3" class="col-sm-2 control-label">备注：</label>
								    <div class="col-sm-4">
										<textarea class="form-control" rows="4" id="pro_remark" name="remark">${goods.remark}</textarea>
								    </div>
								  </div>
								  
								  <div class="form-group publishbutton">
								    <div class="col-sm-6">
								      <button type="button" class="btn btn-default unApply">保存至未提交</button>
								      <!-- <button type="button" class="btn btn-default preview">商品发布预览</button> -->
								      <button type="button" class="btn btn-default confirmpublish">申请发布</button>
								    </div>
								  </div>
							</form>
			  			</div>
			  		</div>
			  		
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
		<script type="text/javascript">
			var currentMenu = 'productManager';
		</script>
		<!-- 公用js文件引入 -->
        <jsp:include page="../../admin/commonJs.jsp"></jsp:include>
        
        <!-- 图片上传 js -->
		<script src="/js/ajaxfileupload.js"></script>
        
        <!-- 编辑器插件 -->
		<script charset="utf-8" src="/cdn/kindeditor-4.1.10/kindeditor.js"></script>
		<script charset="utf-8" src="/cdn/kindeditor-4.1.10/lang/zh_CN.js"></script>
		
		<!-- 图片裁剪插件 js -->
		<script src="/cdn/Jcrop-v0.9.12/js/jquery.Jcrop.min.js"></script>
		
		<!-- 局部js文件 -->
		<script src="/js/admin/productManager/goodpublish.js"></script>
    </body>
</html>